﻿@model RIS.TMP.WEB.APP.Models.MRestoreToAdmin

@{
    ViewBag.Title = "Edit";
}
@section Home{
<h1 class="page-header">
    Add Repair
    <p class="lead">(แจ้งซ่อมและออกใบซ่อมบำรุง)</p>
</h1>
<form class="form-horizontal well" method="POST">

    @using (Html.BeginForm())
    {
        @Html.AntiForgeryToken()
        @Html.ValidationSummary(true)

        <fieldset>
            

            @Html.HiddenFor(model => model.ResId)
            @Html.HiddenFor(model => model.RecordStatus)
            @Html.HiddenFor(model => model.CreateWhen)
            @Html.HiddenFor(model => model.CreateBy)
            @Html.HiddenFor(model => model.UpdateWhen)
            @Html.HiddenFor(model => model.UpdateBy)

            <div class="control-group">
                <label class="control-label" for="select01">ทะเบียนรถ</label>
                <div class="controls">
                    @Html.DropDownList("AddCarId", ViewBag.AddCarId as SelectList, "กรุณาเลือก", new { @style = "width:200px;", @class = "btn btn-default dropdown-toggle", @id = "categorie" })
                    @Html.ValidationMessageFor(model => model.AddCarId)
                </div>
                <p class="help-block" id="NumCar" style="display:none;">เลขทะเบียน   ประเภทรถ  ยี่ห้อ  </p>
            </div>

            <div class="control-group">
                <label class="control-label" for="select01">รายการตรวจเช็คตามระยะ</label>
                <div class="controls">
                    @Html.DropDownList("CCheckPlanId", ViewBag.CCheckPlanId as SelectList, "กรุณาเลือก", new { @style = "width:200px;", @class = "btn btn-default dropdown-toggle", @id = "categorie" })
                    @Html.ValidationMessageFor(model => model.CCheckPlanId)
                </div>
                @*<p class="help-block" id="NumCar" style="display:none;">เลขทะเบียน   ประเภทรถ  ยี่ห้อ  </p>*@
            </div>

            <div class="control-group">
                <label class="control-label" for="select01">ลักษณะการซ่อม</label>
                <div class="controls">
                    @Html.DropDownList("StatusRes", new List<SelectListItem>
                    {
                        new SelectListItem { Text = "ซ่อมแซมปรกติ", Value = "1"},
                        new SelectListItem { Text = "ซ่อมแซมอุบัติเหตุ", Value = "2"},
                        new SelectListItem { Text = "รถเสียนอกพื้นที่", Value = "3"}
                    }, "กรุณาเลือก", new { @style = "width:200px;", @class = "btn btn-default dropdown-toggle" })
                    @Html.ValidationMessageFor(model => model.StatusRes)
                </div>
            </div>

            <div class="control-group">
                <label class="control-label" for="input01">วันที่แจ้งซ่อม</label>
                <div class="controls">
                    @Html.EditorFor(model => model.ResDate)
                    @Html.ValidationMessageFor(model => model.ResDate)
                </div>
            </div>

            <div class="control-group">
                <label class="control-label" for="input01">วันที่ประมาณการนำรถเข้าซ่อม</label>
                <div class="controls">
                    @Html.EditorFor(model => model.SentToDatePair)
                    @Html.ValidationMessageFor(model => model.SentToDatePair)
                </div>
            </div>

            <div class="control-group">
                <label class="control-label" for="input01">รหัสใบแจ้งซ่อม</label>
                <div class="controls">
                    @Html.EditorFor(model => model.ResCode)
                    @Html.ValidationMessageFor(model => model.ResCode)
                </div>
            </div>

            <div class="control-group">
                <label class="control-label" for="input01">เลขไมล์</label>
                <div class="controls">
                    @Html.EditorFor(model => model.MileNo, new { @style = "width:150px;" })
                    @Html.ValidationMessageFor(model => model.MileNo)
                </div>
            </div>

            <div class="control-group">
                <label class="control-label" for="select01">รายการแจ้งซ่อม</label>
                <div class="controls">
                    @Html.DropDownList("CReId", ViewBag.CReId as SelectList, "กรุณาเลือก", new { @style = "width:200px;", @class = "btn btn-default dropdown-toggle" })
                    @*@Html.DropDownList("CReId", "กรุณาเลือก")*@
                    @Html.ValidationMessageFor(model => model.CReId)
                </div>
            </div>

            <div class="control-group">
                <label class="control-label" for="textarea">รายละเอียดในการแจ้งซ่อม</label>
                <div class="controls">
                    @Html.TextAreaFor(model => model.Remarks, new { @style = "width:500px;", @rows = "3" })
                    @Html.ValidationMessageFor(model => model.Remarks)
                </div>
            </div>

            <div class="form-actions">
                <input type="submit" class="btn btn-primary" value="แจ้งซ่อม" />
                @Html.ActionLink("ยกเลิก", "Index", "Home", new object { }, new { @class = "btn btn-default" })
            </div>

            @*<p>
                <input type="submit" value="Save" />
            </p>*@
        </fieldset>
    }
    </form>
        }

    @section Scripts {
        @Scripts.Render("~/bundles/jqueryval")
<script type="text/javascript">
    $(".AA").show();

</script>

    }
